<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {          
            width: 200px;
            height: 100px;
            border: 1px solid black;
            text-align: center;
            border-radius: 5px;
            box-shadow: 2px 2px 2px #ccc;
        }
    </style>
</head>
<body>
    <!--
        v-show
            1.作用:控制元素显示隐藏
            2.语法: v-show ="表达式"   表达式值 true 显示，false 隐藏
            3.实质是css display:none
        v-if
            1.作用:控制元素显示隐藏(条件渲染)
            2.语法: v-if="表达式表达式值 true 显示，false 隐藏
            3.实质是控制html元素的创建和移除
    -->
    <div id="app">
        <div v-show="flag" class="box">v-show控制的div</div>
        <div v-show="if" class="box">v-if控制的div</div>
    </div>

    <script src="../lib/vue.js"></script>

    <script>
        const app = new Vue({
            el: "#app",
            data() {
                return {
                    flag: false
                }
            }

        })
    </script>
</body>
</html>